﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DLL.TrainingPerson
{
	/// <summary>
	/// 数据类
	/// </summary>
	/// <![CDATA[2014-8-26 8:41:09]]>
	public class Database : DataBaseBase
	{
		#region 表结构属性
		public int TRAININGID = 2;
		public int PERSONID = 3;
		public int JOBNUMBER = 4;
		public int PERSONNAME = 5;
		public int HAVESIGNUP = 6;
		public int IDCARD = 7;
		public int TIME = 8;
		public int THEORYSCORE = 9;
		public int OPERATIONSCORE = 10;
		public int USERID = 11;
		public int PERSONDEPARTMENTID = 12;
		public int PERSONDEPARTMENTNAME = 13;
		public int INPUTUSERID = 14;
		public int INPUTDEPARTMENTID = 15;
		#endregion 表结构属性

		public Training.Database clsTrainingDB;

		#region 构造函数
		/// <summary>
		/// 数据类构造函数
		/// </summary>
		/// <![CDATA[2014-8-26 8:41:09]]>
		public Database(System.Web.UI.Page page)
			: base("[TrainingPerson]", page)
		{
			clsTrainingDB = new Training.Database(page);

			_strSQL = "SELECT * FROM "+strTableName+" LEFT JOIN "+clsTrainingDB.strTableName+" ON "+listStructure[TRAININGID].strName+" = "+clsTrainingDB.listStructure[clsTrainingDB.ID].strName+"";
			_strOrder = " ORDER BY CAST("+clsTrainingDB.listStructure[clsTrainingDB.STARTDATE].strName+" AS DATETIME) DESC";
		}
		#endregion 构造函数

	}
}
